SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.vw_planillaDesignacionPolimodal
AS
SELECT     dbo.vwrOrganizacionesSF.Nombre AS Organizacion, dbo.vwrCargosSalariales.Descripcion AS CargoSalarial, 
                      dbo.vwrAsignaturas.Descripcion AS Asignatura, dbo.tb_Plazas.Horas, dbo.tb_Vacantes.Horario, dbo.vwrDivisionesSF.Curso, 
                      dbo.vwrDivisionesSF.Division, dbo.vwrAgentes.Descripcion AS AgenteDesignado, vwrAgentes_1.Descripcion AS DueñoActual, 
                      dbo.tb_Vacantes.Concurso, dbo.vwrTurnos.Mnemo AS Turno, dbo.vwrSituacionRevista.Mnemo AS SitRevDesignado, 
                      dbo.vwrModalidadesEnsenanza.Mnemo AS Modalidad, dbo.vwrCategoriasDeTitulo.mnemo AS CatTit
FROM         dbo.vwrAgentes vwrAgentes_1 INNER JOIN
                      dbo.tb_Vacantes INNER JOIN
                      dbo.tb_Plazas ON dbo.tb_Vacantes.Plaza = dbo.tb_Plazas.idPlaza INNER JOIN
                      dbo.vwrAsignaturas ON dbo.tb_Plazas.Asignatura = dbo.vwrAsignaturas.ID INNER JOIN
                      dbo.vwrTurnos ON dbo.tb_Plazas.Turno = dbo.vwrTurnos.ID ON vwrAgentes_1.ID = dbo.tb_Plazas.DuenoActual LEFT OUTER JOIN
                      dbo.vwrAgentes ON dbo.tb_Vacantes.AgenteDesignado = dbo.vwrAgentes.ID LEFT OUTER JOIN
                      dbo.vwrSituacionRevista ON dbo.tb_Vacantes.SitRevDesignado = dbo.vwrSituacionRevista.ID LEFT OUTER JOIN
                      dbo.vwrModalidadesEnsenanza INNER JOIN
                      dbo.vwrSuborganizaciones ON dbo.vwrModalidadesEnsenanza.ID = dbo.vwrSuborganizaciones.Modalidad ON 
                      dbo.tb_Plazas.SubOrganizacion = dbo.vwrSuborganizaciones.ID LEFT OUTER JOIN
                      dbo.vwrDivisionesSF ON dbo.tb_Plazas.Division = dbo.vwrDivisionesSF.ID LEFT OUTER JOIN
                      dbo.vwrOrganizacionesSF ON dbo.tb_Plazas.Organizacion = dbo.vwrOrganizacionesSF.ID LEFT OUTER JOIN
                      dbo.vwrCargosSalariales ON dbo.tb_Plazas.CargoSalarialDefault = dbo.vwrCargosSalariales.ID LEFT OUTER JOIN
                      dbo.vwrCategoriasDeTitulo ON dbo.tb_Vacantes.CategoriaTituloDesignado = dbo.vwrCategoriasDeTitulo.ID
GO
GRANT SELECT ON  [dbo].[vw_planillaDesignacionPolimodal] TO [CentroDeDesignaciones]
GRANT SELECT ON  [dbo].[vw_planillaDesignacionPolimodal] TO [SoloVer]
GO
EXEC sp_addextendedproperty N'MS_DiagramPane1', N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[53] 4[18] 2[10] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1[50] 2[25] 3) )"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1 [56] 4 [18] 2))"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = -11
      End
      Begin Tables = 
         Begin Table = "vwrAgentes_1"
            Begin Extent = 
               Top = 320
               Left = 486
               Bottom = 428
               Right = 675
            End
            DisplayFlags = 280
            TopColumn = 6
         End
         Begin Table = "tb_Vacantes"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 327
               Right = 241
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "tb_Plazas"
            Begin Extent = 
               Top = 8
               Left = 377
               Bottom = 305
               Right = 607
            End
            DisplayFlags = 280
            TopColumn = 23
         End
         Begin Table = "vwrAsignaturas"
            Begin Extent = 
               Top = 219
               Left = 668
               Bottom = 312
               Right = 857
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "vwrTurnos"
            Begin Extent = 
               Top = 220
               Left = 1019
               Bottom = 313
               Right = 1208
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "vwrAgentes"
            Begin Extent = 
               Top = 330
               Left = 38
               Bottom = 438
               Right = 227
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "vwrSituacionRevista"
            Begin Extent = 
               Top = 359
               Left = 268
               Bottom = 452
               Right = 457
       ', 'USER', N'dbo', 'VIEW', N'vw_planillaDesignacionPolimodal', NULL, NULL
GO
EXEC sp_addextendedproperty N'MS_DiagramPane2', N'     End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "vwrModalidadesEnsenanza"
            Begin Extent = 
               Top = 355
               Left = 906
               Bottom = 448
               Right = 1095
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "vwrSuborganizaciones"
            Begin Extent = 
               Top = 175
               Left = 724
               Bottom = 319
               Right = 913
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "vwrDivisionesSF"
            Begin Extent = 
               Top = 6
               Left = 889
               Bottom = 224
               Right = 1078
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "vwrOrganizacionesSF"
            Begin Extent = 
               Top = 6
               Left = 662
               Bottom = 110
               Right = 851
            End
            DisplayFlags = 280
            TopColumn = 4
         End
         Begin Table = "vwrCargosSalariales"
            Begin Extent = 
               Top = 120
               Left = 660
               Bottom = 213
               Right = 849
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "vwrCategoriasDeTitulo"
            Begin Extent = 
               Top = 105
               Left = 295
               Bottom = 258
               Right = 484
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      RowHeights = 220
      Begin ColumnWidths = 15
         Width = 284
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 1440
         Width = 2025
         Width = 2025
         Width = 1440
         Width = 1845
         Width = 1440
         Width = 1440
         Width = 1440
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 3150
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
', 'USER', N'dbo', 'VIEW', N'vw_planillaDesignacionPolimodal', NULL, NULL
GO
DECLARE @xp int
SELECT @xp=2
EXEC sp_addextendedproperty N'MS_DiagramPaneCount', @xp, 'USER', N'dbo', 'VIEW', N'vw_planillaDesignacionPolimodal', NULL, NULL
GO
